]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellEntry: Don't navigate forward before popping up the menu
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 18 Feb 2013 21:06:53 +0000 (16:06 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 18 Feb 2013 21:17:09 +0000 (16:17 -0500)
Doing it before the grab messes up the grab helper's tracking
of where the focus was before, leading to it not tracking the
saved focus correctly, meaning that when we pop the menu back
down with escape, it doesn't restore focus correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=694123

js/ui/shellEntry.js

index 5ca730c866a666e8affd6317c8880b232247d076..b71c809f15c8a26a8ca1935bd06e93750d2dc7f1 100644 (file)
@@ -74,12 +74,12 @@ const EntryMenu = new Lang.Class({
         if (this._passwordItem)
             this._updatePasswordItem();
 
+        this.parent(animate);
+        this._entry.add_style_pseudo_class('focus');
+
         let direction = Gtk.DirectionType.TAB_FORWARD;
         if (!this.actor.navigate_focus(null, direction, false))
             this.actor.grab_key_focus();
-
-        this.parent(animate);
-        this._entry.add_style_pseudo_class('focus');
     },
 
     close: function(animate) {